﻿{include file="Public:meta"}

<style type="text/css">
.attest p{margin: 0 auto; text-align: left;}
</style>

<title>提现列表</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 会员管理 <span class="c-gray en">&gt;</span> 提现列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
				<tr class="text-c">
					<!-- <th width="40"><input name="" type="checkbox" value=""></th> -->
					<th width="20">UID</th>
					<th width="40">头像</th>
					<th width="30">昵称</th>
					<th width="40">银行卡信息</th>
					<th width="30">提现金额</th>
					<th width="60">申请时间</th>
					<!-- <th width="20">状态</th> -->
					<th width="20">操作</th>
				</tr>
			</thead>
			<tbody>
				{foreach name="data" item="v" key="k"}
					<tr class="text-c">
						<td>{$v.uid}</td>
						<td><img width="50" class="picture-thumb" src="{$v.photo}"></td>
						<td class="text-l">{$v.nickname}</td>
						<td class="text-l">
							开户行：{$v.bank_name} <br />
							联系人：{$v.linker} <br />
							卡号：{$v.card_num} <br />
						</td>
						<td class="text-l">{$v.money} 元</td>
						<td>{$v.create_time}</td>
						<!-- <td class="td-status">
							{if $v.state == 0}
								<span class="label label-secondary radius">待审核</span>
							{elseif $v.state == 1}
								<span class="label label-success radius">已体现</span>
							{elseif $v.state == -1}
								<span class="label label-danger radius">被拒绝</span>
							{/if}
						</td> -->
						<td class="td-manage">
							{if $v.state == 0}
								<a style="text-decoration:none" onclick="check('{$v.id}',1)" href="javascript:;" title="确认" class="btn btn-success radius">
									确认提现
								</a> 
								<a style="text-decoration:none" onclick="check('{$v.id}',-1)" href="javascript:;" title="拒绝" class="btn btn-danger radius">
									拒绝
								</a> 
							{elseif $v.state == 1}
								<p class="btn btn-success round">已提现</p>
							{elseif $v.state == -1}
								<p class="btn btn-default round">拒绝</p>
							{/if}
						</td>
					</tr>
				{/foreach}
			</tbody>
		</table>
	</div>
</div>

<!--_footer 作为公共模版分离出去-->
{include file="Public:footer"}
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__STATIC__/../Admin/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript" src="__STATIC__/../Admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="__STATIC__/../Admin/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
$('.table-sort').dataTable({
	"aaSorting": [[ 1, "desc" ]],//默认第几个排序
	"bStateSave": true,//状态保存
    "aLengthMenu": [[5, 10, 20, -1], [5, 10, 20, "All"]],//指定每页显示条
	"aoColumnDefs": [
	  // {"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
	  {"orderable":false,"aTargets":[0,6]}// 制定列不参与排序
	]
});

function check(id,state)
{
	if(id > 0){
          
        $.post("{:url('Withdraw/check')}",{id:id,state:state},function (res) {

            if(res.code == 1){
            	layer.msg(res.msg,{icon:1,time:1000});
            } else {
            	layer.msg(res.msg,{icon:2,time:1000});
            }
            
            setTimeout(function () {
                location.replace(location.href);
            }, 2000);

        });

    }else {
    	layer.msg('参数有误',{icon:7,time:1000});
    }
}


</script>
</body>
</html>